import Request from "@/utils/request.js";

export const CategoryList = () => {
  return Request.get("/category/list");
};

export const AddCategory = (categoryModel) => {
  return Request.post("/category/add", categoryModel);
};

export const UpdateCategory = (categoryModel) => {
  return Request.put("/category/update", categoryModel);
};

export const DeleteCategory = (id)=>{
  const param = new URLSearchParams();
  param.append("id",id);
  return Request.delete('/category/delete?id='+id);
}
